<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑点评</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">

    <link rel="stylesheet" href="/gupiao/css/weui.css">
    <link rel="stylesheet" href="/gupiao/css/jquery-weui.css">
    <link rel="stylesheet" href="/gupiao/css/style.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_689900_tgundrn0e1a46lxr.css">

    <style>
        .weui-grid__icon .iconfont{font-size: 28px;color:#999;}

        .release-cont .weui-cells{margin-top: 0;}
        .bBeforeBox{padding:0;}
        .bBeforeBox label{width: 50%;}
        .bBeforeBox .bBefore:before{border:0;}
        .qrfb-btn{margin:20px 5px;}
    </style>
</head>
<body class="back1">


<div class="index-top-fix">
    <a href="{:url('gupiao.index/index')}" class="iconfont icon-left- left"></a>
    <p class="title">新建点评</p>
</div>

<div class="mt50"></div>
<form action=""  id="add" method="post">
    <input type="hidden" name="id" id="id" value="{$id}">
    <div class="index-box release-cont">
        <div class="weui-cell weui-cells_checkbox bBeforeBox">
            <label class="weui-cell weui-check__label" for="s13">
                <div class="weui-cell__hd">
                    <input type="radio" class="weui-check" name="is_recomm" id="s13" checked="checked" value="1">
                    <i class="weui-icon-checked"></i>
                </div>
                <div class="weui-cell__bd">
                    <p class="f15">推荐</p>
                </div>
            </label>
            <label class="weui-cell weui-check__label bBefore" for="s14" style="border:0;">
                <div class="weui-cell__hd">
                    <input type="radio" name="is_recomm" class="weui-check" id="s14" value="0">
                    <i class="weui-icon-checked"></i>
                </div>
                <div class="weui-cell__bd">
                    <p class="f15">不推荐</p>
                </div>
            </label>
        </div>
    </div>
    </div>
</form>
<div class="release-bottom">
    <a href="javascript:" onclick="login()" class="weui-btn qrfb-btn" >确认</a>
</div>

</body>
</html>
<script src="/gupiao/js/jquery.min.js"></script>
<script src="/gupiao/js/jquery-weui.min.js"></script>
<script>
    // 新建点评
    function login() {
        $.ajax({
            type: "POST",                       //方法类型
            dataType: "json",                   //预期服务器返回的数据类型
            url: "{:url('gupiao.gupiao/statrtLives')}" ,        //url
            data: $('#add').serialize(),
            success: function (res) {
                if (res.code == 200) {
                    // alert("SUCCESS");
                    var   live_id  = res.live_id;
                    location.href ="{:url('index/live/in')}?id="+live_id;
                };
            },
            error : function() {
                alert("异常！");
            }
        });
    }
</script>

